﻿
using System;
using Npgsql;
using System.Data;
using System.Data.SqlTypes;
using System.ComponentModel.DataAnnotations;

namespace Forums.Domain
{
	
	public class User
	{
		private int userId;
		private string firstName;
		private string lastName;
		private string userName;
		private string userPwd;
		private string email;
		private string city;
		private string country;
		private string timezoneCode;
		
		
		
		
		public int UserId {
			get { return userId; }
			set { userId = value; }
		}
		
		[Required]
		[StringLength(8,MinimumLength =3)]
		[Display(Name = "First Name")]
		public string FirstName {
			get { return firstName; }
			set { firstName = value; }
		}

		[Required]
		[StringLength (9,MinimumLength=3)]
		public string LastName {
			get { return lastName; }
			set { lastName = value; }
		}
		               
		               
		[Required]
        [StringLength(6, MinimumLength = 3)]
        [Display(Name = "User Name")]
        [RegularExpression(@"(\S)+", ErrorMessage = "White space is not allowed")]
      
		public string UserName {
			get { return userName; }
			set { userName = value; }
		}
		
        [Required()]
       		public string UserPwd {
			get { return userPwd; }
			set { userPwd = value; }
		}
        [Required()]
		
		public string Email {
			get { return email; }
			set { email = value; }
		}
        [Required()]
		public string City {
			get { return city; }
			set { city = value; }
		}
        [Required()]
		public string Country {
			get { return country; }
			set { country = value; }
		}
        [Required()]
		public string TimezoneCode {
			get { return timezoneCode; }
			set { timezoneCode = value; }
		}
	}
}





